package com.muyu.danmo.mapper;


import com.muyu.danmo.domain.DanmoGalleryDetailsLikes;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 画廊点赞Mapper接口
 *
 * @author yangle
 * @date 2024-10-23
 */
public interface DanmoGalleryDetailsLikesMapper
{
    /**
     * 查询画廊点赞
     *
     * @param id 画廊点赞主键
     * @return 画廊点赞
     */
    public DanmoGalleryDetailsLikes selectDanmoGalleryDetailsLikesById(Long id);

    /**
     * 查询画廊点赞列表
     *
     * @param danmoGalleryDetailsLikes 画廊点赞
     * @return 画廊点赞集合
     */
    public List<DanmoGalleryDetailsLikes> selectDanmoGalleryDetailsLikesList(DanmoGalleryDetailsLikes danmoGalleryDetailsLikes);

    /**
     * 新增画廊点赞
     *
     * @param danmoGalleryDetailsLikes 画廊点赞
     * @return 结果
     */
    public int insertDanmoGalleryDetailsLikes(DanmoGalleryDetailsLikes danmoGalleryDetailsLikes);

    /**
     * 修改画廊点赞
     *
     * @param danmoGalleryDetailsLikes 画廊点赞
     * @return 结果
     */
    public int updateDanmoGalleryDetailsLikes(DanmoGalleryDetailsLikes danmoGalleryDetailsLikes);

    /**
     * 删除画廊点赞
     *
     * @param id 画廊点赞主键
     * @return 结果
     */
    public int deleteDanmoGalleryDetailsLikesById(Long id);

    /**
     * 批量删除画廊点赞
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteDanmoGalleryDetailsLikesByIds(Long[] ids);

    boolean existsByUserIdAndGalleryDetailsId(Long userId, Long detailsId);

    void updateAmountPraise(@Param("detailsId") Long detailsId);

    Long countByDetailsId(@Param("detailsId") Long detailsId);
}
